import request from '@/utils/request'

// 查询工艺规程列表
export function listProcess(query) {
  return request({
    url: '/mes/process/list',
    method: 'get',
    params: query
  })
}

// 查询工艺规程列表
export function listProcessTree(query) {
  return request({
    url: '/mes/process/listTree',
    method: 'get',
    params: query
  })
}

// 删除工艺规程
export function listProcess_by_processUuid(query) {
  return request({
    url: '/mes/process/' + processUuid,
    method: 'delete'
  })
}

// 查询工艺规程详细
export function getProcess(processUuid) {
  return request({
    url: '/mes/process/' + processUuid,
    method: 'get'
  })
}

// 新增工艺规程
export function addProcess(data) {
  return request({
    url: '/mes/process',
    method: 'post',
    data: data
  })
}

// 复制工艺规程
export function copyProcess(data) {
  return request({
    url: '/mes/process/copy',
    method: 'post',
    data: data
  })
}

// 修改工艺规程
export function updateProcess(data) {
  return request({
    url: '/mes/process',
    method: 'put',
    data: data
  })
}

// 删除工艺规程
export function delProcess(processUuid) {
  return request({
    url: '/mes/process/' + processUuid,
    method: 'delete'
  })
}



// 查询下拉树结构
export function treeSelect(query) {
  return request({
    url: '/mes/process/treeSelect',
    method: 'get',
    params: query
  })
}


// 查询工艺规程列表
export function listVersionNum(query) {
  return request({
    url: '/mes/process/listVersionNum',
    method: 'get',
    params: query
  })
}
